<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>部门岗位</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=yes" name="format-detection" />
    <link href="<%=basepath%>css/index.css" rel="stylesheet" type="text/css">
    <link href="<%=basepath%>css/company.css" rel="stylesheet" type="text/css">
    <script src="<%=basepath%>js/jquery-1.8.3.min.js"></script>
    <script src="<%=basepath%>js/layer/layer.js"></script>
</head>
<body>
<div class="viewport">
    <div class="header">
       <div class="header-1">
           <a href="javascrpt:void(0)" id="join" class="header-2">
              <span id="account" class="account">${empty user.realName ? '' : user.realName}</span>&nbsp;&nbsp;<span id="deptName" class="deptName">${user.departmentName}</span>
           </a>
           <a href="/wape-web/api/core/centerService?serviceCode=WJ9999&targetURL=company&prefix=3g_company&entrance=yes" class="back" id="back">返回</a>
           <span class="span-num">WYP12200</span>
       </div>
    </div>
    <div class="header m-top">
        <div class="hr"></div>
        <div class="header-1">
            <a href="javascript:void(0)" id="join" class="header-2">
                <span>编辑</span>
            </a>
            <a href="javascript:void(0)" class="back">添加部门</a>
        </div>
    </div>
    <div class="content m2-top">
        <div class="blank-m"></div>
        <c:forEach var="dp" items="${dps}">
            <c:if test="${dp.levelNum eq '2' and dp.type eq '1'}">
                <%-- <div class="content4-1">
	                <div class="content4-1-1"><a href="javascript:void(0)"><img src="<%=basepath%>images/b48.png" class="img-4"><span>${dp.sonDepart}</span></a> </div>
	            </div> --%>
	            <div class="content3-2 open-active" id="open-active">
                        <div class="content3-2-1">
                        <a href="javascript:void(0)"><img src="<%=basepath%>images/b48.png" class="img-4"><span class="span3-1">${dp.sonDepart}</span>
                        </a> 
                        </div>
                    </div>
                     <div class="content3-2 none close-active" id="close-active">
                        <c:forEach var="dp2" items="${dps}">
                            <c:if test="${dp2.type eq '1' and dp2.fatherId eq dp.departmentId}">
                                <div class="content3-2-1">
                                    <span class="span3-2">${dp2.sonDepart}</span>
                                </div>
                            </c:if>
                        </c:forEach>
                    </div>
            </c:if>
        </c:forEach>
        <div class="space"></div>
    </div>
</div>
</body>
<script type="text/javascript">
    /*错误提示*/
    $(function(){
        var error = "${requestScope.returnMsg}";
        if(error != "" && error != "成功!"){
            layer.msg(error,{shadeClose:true,shade:0.1,time:2000});
        }
    });
    /*展开*/
    $(function(){
        $(".open-active").click(function(){
            $(this).next(".close-active").fadeToggle(200);
            $(this).find(".img-4").toggleClass("rotation",200);
        });
    });
</script>
</html>
